home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlComboLimitText.au3 < prev    next >
Text File  |  2006-06-17  |  500b  |  24 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Combo,$Btn_Exit,$msg
  7.  
  8. GuiCreate("ComboBox Limit Text", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("", 70, 100, 270, 100,$CBS_SIMPLE)
  11. GUICtrlSetData($Combo,"A|B|C|D|E|F")
  12. _GUICtrlComboLimitText($Combo,10)
  13. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 200, 90, 30)
  14.  
  15. GuiSetState()
  16. While 1
  17.     $msg = GuiGetMsg()
  18.     Select
  19.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  20.             ExitLoop
  21.     EndSelect
  22. WEnd
  23. Exit
  24.